﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeliverDetail.aspx.cs" Inherits="qy_55tuan_Admin_DeliverDetail" %>

<%@ Register Src="~/Admin/Banner.ascx" TagName="TogoBanner" TagPrefix="uc1" %>
<%@ Register Src="~/Admin/Foot.ascx" TagName="Foot" TagPrefix="uc2" %>
<%@ Register Src="~/Admin/Adleft.ascx" TagName="left" TagPrefix="uc3" %>
<%@ Register TagPrefix="epc" Namespace="Hangjing.Control" Assembly="Hangjing.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>配送员信息管理-<%=  WebUtility.GetMyName() %></title>
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../css/boxes.css" rel="stylesheet" type="text/css" />
    <link href="../css/Validator.css" rel="stylesheet" type="text/css" />
    <link href="../css/divDialog.css" rel="stylesheet" type="text/css" />
    <link href="../css/Common.css" rel="stylesheet" type="text/css" />
    <link href="../css/building.css" rel="stylesheet" type="text/css" />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="../css/iestyles.css" media="all" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/below_ie7.css" media="all" />
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/ie7.css" media="all" />
    <![endif]-->

    <script type="text/javascript" src="../javascript/DatePicker/WdatePicker.js"></script>

    <script src="../javascript/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../javascript/Common.js" type="text/javascript"></script>

    <script src="../javascript/ScollTop.js" type="text/javascript"></script>

    <script src="../javascript/ShowDivDialog.js" type="text/javascript"></script>




</head>
<body>
    <form id="form1" runat="server">
        <!--加载中显示的div-->
        <div id="loading-mask">
            <p class="loader" id="loading_mask_loader">
                <img src="../images/ajax-loader-tr.gif" alt="加载中..." /><br />
                请等待...
            </p>
        </div>
        <epc:Hint ID="Hint1" runat="server" HintImageUrl="images/Control" />
        <div class="wrapper">
            <!--banner start-->
            <uc1:TogoBanner runat="server" ID="Banner" />
            <!--banner end-->
            <!--center start-->
            <div class="middle" id="anchor-content">
                <div id="page:main-container">
                    <div class="columns ">
                        <div class="side-col" id="page:left">
                            <uc3:left runat="server" ID="left" />
                        </div>
                        <div class="main-col" id="content">
                            <asp:ScriptManager ID="ScriptManager1" runat="server">
                            </asp:ScriptManager>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <div class="main-col-inner">
                                        <div id="divMessages">
                                        </div>
                                        <div style="visibility: visible;" class="content-header">
                                            <h3 class="icon-head head-customer">
                                                <asp:Label runat="server" ID="pageType"></asp:Label></h3>
                                            <div style="width: 0px; height: 17px;" class="content-buttons-placeholder">
                                                <p style="" class="content-buttons form-buttons">
                                                    <button type="button" class="scalable back" onclick='GotoADList()' style="margin-bottom: 0; float: left; margin-right: 3px;">
                                                        <span>返回列表</span></button>
                                                    <asp:Button ID="btSave" runat="server" CssClass="button_1" OnClick="btSave_Click"
                                                        Text="保存"></asp:Button>
                                                </p>
                                            </div>
                                        </div>

                                        <ul id="diagram_tab" class="tabs-horiz" style="border-bottom: none" runat="server">
                                            <li><a id="diagram_tab_orders" class="tab-item-link active" href="javascript:">
                                                <span><span class="changed"></span><span class="error"></span>基本信息</span> </a>
                                            </li>

                                            <li><a href="Deliverotherinfo.aspx?tid=<%= Request["id"] %>" class="tab-item-link "><span>
                                                <span class="changed"></span><span class="error"></span>其他信息</span> </a></li>


                                            <li><a href="deliverAddMoneyLog.aspx?tid=<%= Request["id"] %>" class="tab-item-link "><span>
                                                <span class="changed"></span><span class="error"></span>收支记录</span> </a></li>




                                             <li><a href="deliverpath.aspx?tid=<%= Request["id"] %>" class="tab-item-link "><span>
                                                <span class="changed"></span><span class="error"></span>轨迹</span> </a></li>

                                        </ul>

                                        <fieldset class="AdminSearchform" runat="server" id="sumbox">
                                            <legend>统计</legend>
                                            <div style="clear: both; padding: 10px;">
                                                <span>完成总单数:<span style="margin-left: 20px; font-weight: bold; color: Red"
                                                    id="lborder" runat="server">0</span><span style="color: red">单</span>
                                                </span>
                                                <span style="margin-left: 20px;">总里程:
                                            <span style="font-weight: bold; color: Red" id="lballdistance" runat="server">0</span>
                                                    <span style="color: red">公里</span>
                                                </span>

                                                 <span style="margin-left: 20px;">余额:
                                            <span style="font-weight: bold; color: Red" id="lbmoney" runat="server">0</span>
                                                    <span style="color: red">元</span>
                                                </span>

                                                <span style="margin-left: 20px;"><a href="/Admin/shop/OrderList.aspx?did=<%= Request["id"] %>" target="_blank">历史订单</a>

                                                </span>
                                            </div>
                                        </fieldset>

                                        <!--start-->
                                        <div class="entry-edit">
                                            <div id="customer_info_tabs_account_content" style="">
                                                <div class="entry-edit">
                                                    <div class="entry-edit-head">
                                                        <h4 class="icon-head head-billing-address">配送员信息</h4>
                                                    </div>
                                                    <fieldset class="np">
                                                        <div class="order-address" id="order-billing_address_fields">
                                                            <div class="content">
                                                                <div class="hor-scroll">
                                                                    <table class="form-list" cellspacing="0">
                                                                        <tbody>

                                                                            <tr>
                                                                                <td class="left_td">
                                                                                    <label for="_accountprefix">
                                                                                        审核状态：<span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:RadioButtonList runat="server" ID="rblrevevar3" RepeatDirection="Horizontal">
                                                                                        <asp:ListItem Value="1" Text="已审核"></asp:ListItem>
                                                                                        <asp:ListItem Value="0" Text="未审核"></asp:ListItem>
                                                                                        <asp:ListItem Value="2" Text="拒绝"></asp:ListItem>
                                                                                    </asp:RadioButtonList>
                                                                                </td>
                                                                            </tr>




                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        群组 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList ID="ddlDeliverGroup" runat="server" Width="100">
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountprefix">
                                                                                        姓名<span class="required">*</span></label>
                                                                                    <asp:HiddenField runat="server" ID="hidTogoId" />
                                                                                    <asp:HiddenField runat="server" ID="hidDataId" />
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbName" CanBeNull="必填" Width="160px" class=" required-entry required-entry input-text"></epc:TextBox>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>


                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        保证金 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbrevefloat1" CanBeNull="必填" Width="60px" Text="0" class=" required-entry required-entry input-text"></epc:TextBox>元
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>


                                                                            <tr>

                                                                                <td class="value" colspan="3">
                                                                                    <div class="notice">
                                                                                        “用户名”，“密码”用于登录骑士客户端
                                                                                    </div>
                                                                                </td>

                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        用户名 <span class="required"></span>
                                                                                    </label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbUserName" Width="160px" onblur="validShopAccount()"  class=" required-entry required-entry input-text"></epc:TextBox><label id="lbaccountnotice" style=" color:red;"></label>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountprefix">
                                                                                        密码<span class="required"></span></label>
                                                                                    <asp:HiddenField runat="server" ID="HiddenField3" />
                                                                                    <asp:HiddenField runat="server" ID="HiddenField4" />
                                                                                    <asp:HiddenField runat="server" ID="hidPassword" />
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbpassword" Width="160px" class=" required-entry required-entry input-text"></epc:TextBox><div
                                                                                        class="mynotice">
                                                                                        如不修改密码留空即可
                                                                                    </div>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        电话 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbPhone" CanBeNull="必填" Width="160px" class=" required-entry required-entry input-text"></epc:TextBox>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>

                                                                         



                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        岗位 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="ddreveint1">
                                                                                        <asp:ListItem Value="0" Text="员工"></asp:ListItem>
                                                                                        <asp:ListItem Value="10" Text="组长"></asp:ListItem>
                                                                                        <asp:ListItem Value="20" Text="副店长"></asp:ListItem>
                                                                                        <asp:ListItem Value="30" Text="店长"></asp:ListItem>
                                                                                        <asp:ListItem Value="40" Text="副经理"></asp:ListItem>
                                                                                        <asp:ListItem Value="50" Text="经理"></asp:ListItem>

                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        基本工资 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbreveint2" CanBeNull="必填" RequiredFieldType="正整数" Width="60px" Text="0" class=" required-entry required-entry input-text"></epc:TextBox>元
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        提成比例 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbreveint3" CanBeNull="必填" RequiredFieldType="数据校验" Width="60px" Text="0" class=" required-entry required-entry input-text"></epc:TextBox>%
                                                                                    <div class="mynotice">（配送费的提成比例）</div>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>


                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        app状态 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:Label runat="server" ID="lbstatus">离线</asp:Label><div class="notice">[<%= Hangjing.Common.Constant.OffLineDoor %>分钟内未上传坐标表示已经离线]</div>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        工作状态 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="tbworkstate">
                                                                                        <asp:ListItem Value="0" Text="休息"></asp:ListItem>
                                                                                        <asp:ListItem Value="10" Text="待岗"></asp:ListItem>
                                                                                        <asp:ListItem Value="20" Text="取货中"></asp:ListItem>
                                                                                        <asp:ListItem Value="30" Text="送货中"></asp:ListItem>
                                                                                        <asp:ListItem Value="40" Text="异常"></asp:ListItem>
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        车辆<span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="tbcartype">
                                                                                        <asp:ListItem Value="电动车" Text="电动车"></asp:ListItem>
                                                                                        <asp:ListItem Value="摩托车" Text="摩托车"></asp:ListItem>
                                                                                        <asp:ListItem Value="面包车" Text="面包车"></asp:ListItem>
                                                                                        <asp:ListItem Value="小车" Text="小车"></asp:ListItem>
                                                                                    </asp:DropDownList>

                                                                                    <asp:DropDownList runat="server" ID="tbcarower">
                                                                                        <asp:ListItem Value="1" Text="公司"></asp:ListItem>
                                                                                        <asp:ListItem Value="0" Text="自带"></asp:ListItem>
                                                                                    </asp:DropDownList>



                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        车牌 <span class="required"></span>
                                                                                    </label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbcarnum" Width="160px" class=" required-entry required-entry input-text"></epc:TextBox>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>


                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        职位类别 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="tbpost">
                                                                                        <asp:ListItem Value="100" Text="全职"></asp:ListItem>
                                                                                        <asp:ListItem Value="90" Text="兼职"></asp:ListItem>
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>


                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        在职状态 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="ddlSection">
                                                                                        <asp:ListItem Value="试用" Text="试用"></asp:ListItem>
                                                                                        <asp:ListItem Value="正式" Text="正式"></asp:ListItem>

                                                                                        <asp:ListItem Value="离职" Text="离职"></asp:ListItem>
                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        部门 <span class="required"></span>
                                                                                    </label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbInve2" Width="160px" class=" required-entry required-entry input-text"></epc:TextBox>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>



                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        医社保 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <epc:TextBox runat="server" ID="tbrevefloat2" CanBeNull="必填" RequiredFieldType="数据校验" Width="60px" Text="0" class=" required-entry required-entry input-text"></epc:TextBox>元
                                                                                    
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        意外险 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="ddlrevevar1">
                                                                                        <asp:ListItem Value="已交" Text="已交"></asp:ListItem>
                                                                                        <asp:ListItem Value="未交" Text="未交"></asp:ListItem>


                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        贴广告 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="ddlrevevar2">
                                                                                        <asp:ListItem Value="半贴" Text="半贴"></asp:ListItem>
                                                                                        <asp:ListItem Value="全贴" Text="全贴"></asp:ListItem>


                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>



                                                                            <tr>
                                                                                <td class="label">
                                                                                    <label for="_accountfirstname">
                                                                                        等级 <span class="required">*</span></label>
                                                                                </td>
                                                                                <td class="value">
                                                                                    <asp:DropDownList runat="server" ID="tbgrade">
                                                                                        <asp:ListItem Value="1" Text="1星"></asp:ListItem>
                                                                                        <asp:ListItem Value="2" Text="2星"></asp:ListItem>
                                                                                        <asp:ListItem Value="3" Text="3星"></asp:ListItem>
                                                                                        <asp:ListItem Value="4" Text="4星"></asp:ListItem>
                                                                                        <asp:ListItem Value="5" Text="5星"></asp:ListItem>

                                                                                    </asp:DropDownList>
                                                                                </td>
                                                                                <td>
                                                                                    <small>&nbsp;</small>
                                                                                </td>
                                                                            </tr>


                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </fieldset>
                                                </div>
                                            </div>
                                        </div>
                                        <!--end-->
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                </div>
            </div>
            <!--foot start-->
            <uc2:Foot runat="server" ID="FootUC" />
            <!--foot end-->
        </div>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">

    $(window).load(function () { $("#loading-mask").hide(); });


    function GotoADList() {
        var sid = Request("sid");
        window.location.href = "DeliverList.aspx";
    }

    $(document).ready(function () {
        var id = request("cityid");
        if (id == "" || id == "0") {
            show_citytable();
        }

    })

    function select_mycity(name, id) {
        var url = "DeliverDetail.aspx?cityid=" + id + "&cname=" + escape(name);
        var dataid = request("id");
        if (dataid != "" && dataid != "0") {
            url +=  "&id="+dataid;
        }
        window.location = url;

    }

    function closediv() {
        alert("请先选择城市");
        return false;
    }

</script>

<script type="text/javascript">
    //判断帐号是否可用
    function validShopAccount() {
        var account = $("#tbUserName").val();
        if (account == "") {
            alert("请输入登录帐号");
            return;
        }
        var shopid = Request("id");
        if (shopid == "") {
            shopid = "0";
        }
        jQuery.ajax(
        {
            type: "post",
            cache: false,
            url: "/ajaxHandler.ashx",
            data: "method=validDeliverAccount&shopid=" + shopid + "&account=" + account,
            success: function (msg) {
                if (msg != "1") {
                    $("#lbaccountnotice").html("此帐号已经存在");
                }
                else {
                    $("#lbaccountnotice").html("");
                }


            }
        })

    }

</script>